package com.boot.mgt.controller.app

import com.boot.core.result.ResultTo
import com.boot.mgt.model.TaSysConfig
import com.boot.mgt.service.TaSysConfigService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

/**
 * @author kawins
 * createTime 2019-03-18 21:31
 */
@RestController
@RequestMapping("/app/sys")
class TaSysConfigController {

    @Autowired
    private lateinit var taSysConfigService: TaSysConfigService


    @PutMapping
    fun update(@RequestParam sysConfig: TaSysConfig): ResultTo {
        taSysConfigService.update(sysConfig)
        return ResultTo()
    }

    @GetMapping
    fun select(): ResultTo {
        return taSysConfigService.selectAll()
    }
}